<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理</title>
<link href="../public/admin/images/style.css" rel="stylesheet" type="text/css" />
 <link rel="stylesheet" href="../public/admin/layui/css/layui.css"  media="all">
<style type="text/css">
body {
	background:#FFF
}
</style>
</head>
<?php
include '../config/mysql.php'
?>
<body>
    <div id="contentWrap">
        <div class="pageTitle">
            <div class="pageColumn">
                <div class="layui-container">
                        <fieldset class="layui-elem-field layui-field-title" style="margin-top: 50px;">
                          <legend>添加图书</legend>
                        </fieldset>
                        <form class="layui-form layui-form-pane" action="goodscheck.php" method="post" enctype="multipart/form-data">

                            <div class="layui-form-item">
                                <label class="layui-form-label">分类</label>
                                <div class="layui-input-block">
                                    <select name="class_id" lay-filter="aihao">
                                        <?php foreach (select("select * from class",'all') as $k=>$v){?>
                                        <option value="<?php echo $v['id']?>"><?php echo $v['name']?></option>
                                        <?php }?>
                                    </select>
                                </div>
                            </div>


                            <div class="layui-form-item">
                                <label class="layui-form-label">名称</label>
                                <div class="layui-input-block">
                                    <input type="text" name="name" autocomplete="off" placeholder="请输入" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">价格</label>
                                <div class="layui-input-block">
                                    <input type="text" name="price" autocomplete="off" placeholder="" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">图片</label>
                                <div class="layui-input-block">
                                    <input type="file" name="image" autocomplete="off" placeholder="请输入" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label class="layui-form-label">书号</label>
                                <div class="layui-input-block">
                                    <input type="text" name="cm" autocomplete="off" placeholder="请输入" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">出版单位</label>
                                <div class="layui-input-block">
                                    <input type="text" name="tz" autocomplete="off" placeholder="请输入" class="layui-input">
                                </div>
                            </div>

                            <div class="layui-form-item">
                                <label class="layui-form-label">库存</label>
                                <div class="layui-input-block">
                                    <input type="text" name="num" autocomplete="off" placeholder="请输入" class="layui-input">
                                </div>
                            </div>

                          <div class="layui-form-item">
                              <input name="typec" type="hidden" value="addgoods"/>
                            <button class="layui-btn" lay-submit="" lay-filter="demo2">添加</button>
                          </div>
                        </form>
                </div>
            </div>
        </div>
    </div>
</body>
<script src="../public/admin/layui/layui.js" charset="utf-8"></script>
<script>
layui.use(['form', 'layedit'], function(){
  var form = layui.form
    var layedit = layui.layedit;

});
</script>
</html>
